#  -*- coding:utf-8
'''

@File : sim_DisPost

@Author: 爸爸

@Date : 2020/03/23

@Desc :
'''
import json
import random
import threading
import time

import requests
# import tornado
# import tornado.ioloop
# import tornado.web
# import tornado.httpserver
# from tornado.options import options, define

# define("port", default=6001, help="run on the given port", type=int)
host = "http://127.0.0.1:5000"
devices = [
    {"deviceType": "10101",  # 无效数据
     "deviceId": "1",  # 无效数据
     "deviceIp": "192.189.2.1",  # 无效数据
     "devNo": 3  # 有效数据
     },
    {"deviceType": "10102",
     "deviceId": "2",
     "deviceIp": "192.189.2.2",
     "devNo": 4
     },
    {"deviceType": "10103",
     "deviceId": "3",
     "deviceIp": "192.189.2.3",
     "devNo": 5
     },
]
cars = [
    {
        "ccrNos": "京A19029",
        "lprNo": "jzx009",
    },
    {
        "ccrNos": "京A19021",
        "lprNo": "jzx002",
    },
    {
        "ccrNos": "京A19022",
        "lprNo": "jzx002",
    }, {
        "ccrNos": "京A19023",
        "lprNo": "jzx003",
    },
    {
        "ccrNos": "京A19024",
        "lprNo": "jzx004",
    },
]
regist = 1

datarm=[{"unitId":"TFNAN-X-191101","recordId":"1","createAt":"2019-12-12 11:01:03","ccrRecord":[{"containerNumber":"LJHdddddddddd","category":"standard20","location":"front"},{"containerNumber":"LJHddd5","category":"standard20","location":"front"}],"ccrPictureIds":["CCR.1_0.jpg","CCR.1_1.jpg","CCR.1_2.jpg","CCR.1_3.jpg"],"lprPictureIds":["LPR.1_0.jpg"],"lprVideoId":"1.avi","lprRecord":"京G012346","rm2000NhRecord":{"speed":70,"isOverSpeed":False,"isTimeout":False,"alarmInfos":["gammaLow","neutronLow"],"gammaCountingRates":[{"thresholds":[1901.6,2519.2,3754.6],"data":[3711,1725,1727,1735,1774,1808,1775,1746,1719,1698,1687,1722,3695,1721,1725,1711,1736,1757,1741,1708,1686,1640,1642,1644,1669,1671,1694,1730,1746]},{"thresholds":[4802.9,5805.6,7811],"data":[4492,4526,4511,4524,4550,4604,4579,4575,4532,4480,4431,4465,4425,4467,4506,4469,4477,4527,4507,4478,4495,4435,4432,4472,4495,4461,4483,4489,4519]},{"thresholds":[6598.7,7780.2,10143.3],"data":[6175,6210,6202,6230,6243,6330,6341,6333,6258,6182,6120,6164,6152,6193,6237,6198,6196,6275,6311,6302,6308,6199,6121,6142,6170,6149,6190,6230,6244]},{"thresholds":[7526.1,8790.5,11319.1],"data":[7058,7128,7083,7100,7138,7244,7239,7215,7143,7062,6992,7041,7074,7132,7172,7166,7167,7255,7289,7267,7255,7139,7065,7061,7103,7064,7112,7149,7168]},{"thresholds":[8483.2,9827.8,12517],"data":[7988,8025,8011,8047,8072,8196,8235,8203,8126,8057,7961,7990,7997,8056,8084,8087,8090,8185,8235,8197,8195,8086,8017,8005,8053,8018,8080,8111,8119]},{"thresholds":[8613,9968.1,12678.3],"data":[8116,8148,8146,8184,8213,8328,8363,8323,8244,8174,8072,8098,8103,8175,8200,8214,8230,8329,8374,8339,8329,8210,8132,8119,8163,8135,8199,8232,8242]}],"gammaDetectorRecords":[{"detectorId":"G11","countingRates":[{"thresholds":[235.6,431.3,822.8],"data":[177,176,173,176,168,184,176,174,171,176,180,191,189,202,198,182,171,172,174,160,154,161,161,149,158,165,155,165,175]},{"thresholds":[661.5,1011.6,1711.8],"data":[553,555,557,577,573,600,592,586,564,537,528,537,535,573,588,592,563,572,561,531,507,525,511,504,530,534,526,564,562]},{"thresholds":[929.1,1350.4,2192.9],"data":[794,788,785,801,789,831,820,816,792,760,750,772,764,806,821,824,790,811,811,783,756,759,736,739,773,773,778,818,806]},{"thresholds":[1063.4,1516.4,2422.6],"data":[907,900,895,912,908,945,938,931,914,881,882,892,893,942,948,944,920,936,923,905,874,881,862,864,894,897,892,936,924]},{"thresholds":[1205.7,1690.4,2659.8],"data":[1038,1028,1031,1041,1040,1084,1075,1068,1046,1017,1008,1023,1014,1071,1084,1090,1073,1088,1076,1040,1010,1019,999,1000,1042,1044,1027,1084,1065]},{"thresholds":[1225.2,1714,2691.8],"data":[1053,1042,1040,1052,1057,1102,1093,1089,1069,1034,1026,1043,1031,1089,1103,1111,1094,1109,1092,1059,1025,1036,1015,1018,1056,1059,1039,1102,1084]}],"doseRates":{"thresholds":[0.2,4.3],"data":[0.085385333333333632,0.0842260000000003,0.0891080000000003,0.086039333333333634,0.083514666666666959,0.086714000000000291,0.086059333333333626,0.083897333333333629,0.081132666666666964,0.0845960000000003,0.0818200000000003,0.082199333333333624,0.081324000000000285,0.085625333333333609,0.086584666666666948,0.087725333333333613,0.089846000000000287,0.090302000000000285,0.092710666666666941,0.085740000000000274,0.0869673333333336,0.0860293333333336,0.085546000000000261,0.084637333333333592,0.091864666666666928,0.091060000000000266,0.088806666666666922,0.091136666666666921,0.087320000000000259]},"spectrumData":[0,0,0,0,0,0,0,0,0,0,5,29,21,17,22,27,27,35,38,42,50,40,48,47,49,53,54,56,66,67,71,57,55,64,70,72,64,74,68,66,70,69,72,65,73,62,57,68,72,74,67,43,72,60,66,54,65,72,58,54,56,52,59,63,57,47,51,39,46,45,28,49,53,49,47,41,45,44,48,33,38,37,31,27,37,39,41,25,33,30,25,18,30,27,25,27,23,27,29,24,27,22,27,24,18,28,26,25,29,30,24,24,18,24,25,17,24,20,19,20,20,15,22,20,24,12,14,21,9,16,16,16,11,14,15,16,10,18,22,12,7,14,15,12,14,18,8,14,15,14,15,8,13,10,15,11,10,14,10,13,8,11,7,10,10,10,13,5,12,18,17,6,10,8,8,6,13,11,10,14,15,11,7,7,9,6,13,12,14,10,11,6,12,8,11,5,8,7,10,7,10,7,4,8,8,8,3,10,8,3,3,3,2,7,2,5,2,3,4,8,10,8,10,4,5,4,7,5,13,8,10,11,6,8,10,5,4,5,4,7,5,12,4,3,12,8,6,7,6,8,6,6,6,6,6,8,5,6,5,6,8,9,8,4,4,6,3,3,6,2,5,2,2,6,5,7,6,2,9,7,1,9,3,4,6,6,6,6,6,5,6,5,9,6,5,5,6,4,5,3,5,5,5,6,6,6,3,7,4,6,4,7,9,3,5,6,2,8,6,2,7,3,2,4,2,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1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"detectorId":"G12","countingRates":[{"thresholds":[295.8,519,965.4],"data":[216,203,209,211,228,233,246,235,237,230,227,225,213,218,214,208,227,235,226,222,231,208,212,220,228,227,223,216,216]},{"thresholds":[692,1050.9,1768.6],"data":[564,544,556,541,579,617,640,623,625,609,587,590,571,580,584,568,579,595,578,570,589,554,566,588,583,572,582,568,553]},{"thresholds":[928.9,1350.2,2192.6],"data":[767,743,764,763,805,834,859,837,828,807,795,801,781,793,804,794,803,824,813,803,812,773,781,804,792,781,802,787,765]},{"thresholds":[1052.2,1502.7,2403.7],"data":[893,877,883,887,930,966,988,965,947,928,914,915,894,909,919,905,922,951,932,914,922,879,884,909,912,900,921,905,887]},{"thresholds":[1177.9,1656.6,2613.9],"data":[998,982,982,997,1046,1089,1111,1100,1071,1051,1030,1038,1010,1033,1039,1029,1039,1071,1046,1028,1033,987,995,1032,1034,1015,1050,1021,994]},{"thresholds":[1194.4,1676.7,2641.2],"data":[1018,1001,1006,1019,1067,1103,1124,1110,1080,1066,1044,1057,1027,1052,1056,1051,1058,1092,1066,1048,1050,1001,1009,1047,1047,1027,1066,1037,1009]}],"doseRates":{"thresholds":[0.2,3.9],"data":[0.072512666666665837,0.073134666666665835,0.067580666666665831,0.073735999999999163,0.077861333333332491,0.085437999999999154,0.086535999999999155,0.091043333333332491,0.086081999999999159,0.081469999999999154,0.079881999999999148,0.078853333333332484,0.077057999999999155,0.079307999999999157,0.07989399999999916,0.077751333333332492,0.078451999999999161,0.08012999999999916,0.077899333333332488,0.07648866666666583,0.076845999999999165,0.07579466666666583,0.076358666666665825,0.080553333333332491,0.082477999999999149,0.08040866666666581,0.083771333333332476,0.079022666666665811,0.076162666666665824]},"spectrumData":[0,0,0,0,0,0,0,0,0,0,20,32,31,31,14,18,20,24,27,29,48,38,43,37,61,60,44,51,55,58,71,66,64,56,58,61,63,80,61,52,69,71,73,63,60,61,73,65,59,71,61,62,62,53,54,61,54,44,53,57,60,55,52,45,49,54,62,61,41,38,58,42,53,44,39,44,41,46,32,41,42,32,36,48,40,37,41,34,31,27,33,35,30,24,22,28,24,22,25,20,18,29,23,34,37,24,16,24,21,28,22,21,31,13,29,15,24,16,19,22,16,22,22,13,8,17,16,16,12,14,11,18,16,15,16,15,18,19,16,10,14,13,12,8,6,13,16,11,15,14,19,15,18,12,9,4,11,11,10,14,19,15,5,10,12,10,14,7,12,11,8,13,11,16,10,8,9,9,10,9,9,11,12,12,12,13,14,4,11,10,8,10,11,6,13,8,10,8,9,7,10,9,11,13,12,6,13,5,4,10,3,7,9,10,9,4,6,10,7,8,9,9,4,5,9,4,4,11,4,8,4,10,6,2,9,10,6,6,10,5,6,1,4,5,9,3,4,4,5,5,8,4,10,8,5,7,8,4,6,4,8,5,1,7,8,8,5,4,2,4,4,3,7,1,8,4,1,1,7,8,4,7,3,5,6,6,3,4,9,4,5,5,4,3,5,9,7,5,5,3,6,2,6,7,6,6,6,4,4,2,4,10,5,6,5,6,6,4,4,2,4,1,4,2,3,6,4,4,5,4,7,6,1,10,4,7,4,3,2,4,6,3,1,2,4,3,2,6,2,3,5,0,5,4,4,0,7,5,5,6,5,2,3,2,3,5,4,4,2,4,2,4,3,6,5,4,3,2,3,3,4,3,2,1,2,5,3,3,3,3,8,1,2,3,1,5,4,1,2,2,1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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"detectorId":"G21","countingRates":[{"thresholds":[272.1,484.9,910.5],"data":[218,210,208,217,227,229,235,228,221,230,221,201,186,179,169,181,210,211,217,220,212,198,210,210,207,203,200,213,212]},{"thresholds":[652.1,999.5,1694.2],"data":[542,522,516,535,538,539,557,552,547,551,548,519,492,473,459,485,515,522,534,548,526,533,542,541,549,539,515,535,531]},{"thresholds":[881.3,1290.7,2109.5],"data":[745,720,710,730,734,742,776,774,753,762,752,712,686,668,645,677,712,726,751,778,752,746,738,729,744,742,723,752,746]},{"thresholds":[999.9,1438.2,2314.8],"data":[838,814,802,811,827,842,877,882,874,874,858,823,796,774,754,788,812,827,852,878,852,847,840,837,844,847,832,861,850]},{"thresholds":[1120,1586,2517.8],"data":[957,912,900,914,920,938,991,992,993,995,975,932,914,893,868,901,919,928,946,977,952,955,947,944,947,960,942,974,964]},{"thresholds":[1136.1,1605.6,2544.5],"data":[970,924,913,927,934,954,1010,1010,1010,1012,990,942,924,907,880,915,934,947,965,997,972,971,959,951,956,969,953,984,981]}],"doseRates":{"thresholds":[0.2,3.8],"data":[0.076414666666666325,0.069426666666666331,0.068027999999999658,0.068911999999999668,0.066801999999999667,0.068097333333333,0.074149999999999661,0.074481333333333,0.07789599999999966,0.077999999999999667,0.076455999999999677,0.075655999999999682,0.07767599999999969,0.074627333333333018,0.073360666666666352,0.073422666666666359,0.070913333333333023,0.067599333333333025,0.066951999999999692,0.069443333333333024,0.0687319999999997,0.072794666666666369,0.073676666666666363,0.0766399999999997,0.07408199999999969,0.078314666666666366,0.076406666666666373,0.079387999999999709,0.074581999999999718]},"spectrumData":[0,0,0,0,0,0,0,0,0,0,0,6,17,17,19,17,22,25,31,43,35,37,45,38,49,42,48,65,62,47,65,53,72,70,75,65,66,67,60,59,56,72,58,46,63,68,59,56,63,53,50,57,62,53,53,44,46,52,53,45,51,43,53,46,43,33,48,38,44,53,37,40,34,38,42,44,48,33,41,38,39,41,30,42,30,37,33,16,19,26,24,26,27,34,33,24,26,29,24,25,29,28,21,21,22,10,26,20,21,28,34,14,17,20,17,19,16,18,15,11,22,20,18,20,17,17,17,13,11,10,13,6,17,8,11,9,12,19,11,12,10,16,11,10,8,12,21,14,14,11,14,13,15,9,16,13,10,18,17,11,11,11,12,6,7,7,15,9,10,15,15,6,8,6,13,9,6,6,7,9,11,8,12,8,8,9,10,9,8,8,5,6,11,6,12,6,6,9,1,8,6,10,10,5,4,7,6,5,8,6,10,4,5,11,8,5,8,4,7,3,4,3,6,5,5,5,9,4,7,9,10,3,6,2,8,2,6,9,7,2,4,5,12,6,1,6,3,2,11,8,2,5,10,4,7,5,4,6,8,4,4,1,4,4,1,1,8,4,6,9,6,0,6,3,4,4,2,8,2,5,7,8,6,2,1,3,8,4,6,4,4,2,6,4,6,6,5,2,5,4,2,6,2,1,8,7,6,5,3,7,5,6,5,7,2,5,4,8,2,4,5,5,5,1,2,6,6,4,6,6,3,4,1,1,4,3,1,4,3,2,4,3,2,1,6,2,3,3,3,2,6,4,5,4,3,4,1,5,3,2,1,8,3,4,0,3,3,3,2,4,3,3,2,4,5,7,5,3,6,2,1,0,4,2,4,1,0,2,3,5,0,5,3,2,2,1,1,5,4,2,0,4,0,2,4,3,4,1,1,4,2,1,1,1,6,1,1,2,2,1,5,0,3,1,1,2,0,1,0,1,1,2,4,1,1,1,2,3,4,4,3,4,3,6,4,5,7,3,9,4,6,7,6,5,4,6,7,13,6,11,19,8,7,3,4,10,7,8,10,5,8,7,6,1,1,6,3,3,4,4,4,4,4,5,4,3,2,1,3,5,3,1,2,1,1,0,0,0,0,1,0,1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,0,0,0,0,0,0,0,0,0,0]},{"detectorId":"G22","countingRates":[{"thresholds":[279.8,496,928.4],"data":[185,201,205,203,209,211,211,222,233,232,244,243,234,230,238,223,219,226,216,210,210,209,201,206,203,201,208,215,219]},{"thresholds":[655,1003.3,1699.7],"data":[515,552,545,542,549,519,528,528,540,545,574,568,574,571,590,567,550,559,557,544,548,542,543,538,529,527,550,537,573]},{"thresholds":[880.3,1289.4,2107.6],"data":[706,756,759,759,766,734,747,745,747,748,775,767,777,765,776,755,745,761,773,764,773,757,742,738,730,714,734,725,758]},{"thresholds":[993.7,1430.5,2304.2],"data":[810,865,861,868,871,842,851,846,851,858,880,884,903,888,900,886,872,879,890,874,881,861,862,857,850,833,852,836,874]},{"thresholds":[1111.5,1575.5,2503.4],"data":[925,983,972,987,981,954,959,958,961,968,997,1010,1021,1003,1017,1001,980,996,1005,984,983,966,972,967,966,959,976,951,988]},{"thresholds":[1127,1594.4,2529.3],"data":[937,997,984,999,994,964,967,969,973,983,1013,1027,1036,1018,1027,1009,990,1009,1016,995,997,980,983,980,978,969,986,960,1000]}],"doseRates":{"thresholds":[0.1,3.7],"data":[0.075196666666667411,0.07787600000000075,0.076716666666667419,0.080304666666667412,0.076567333333334084,0.078282666666667416,0.078366000000000754,0.077268666666667415,0.075824666666667415,0.074542000000000747,0.076217333333334081,0.079581333333334087,0.07991733333333409,0.077670000000000752,0.081244666666667423,0.082181333333334078,0.078417333333334088,0.079276000000000749,0.080972666666667414,0.078513333333334087,0.074520000000000752,0.073864000000000748,0.077762666666667424,0.0763793333333341,0.078828000000000759,0.08170600000000075,0.081354666666667408,0.078220000000000733,0.077517333333334063]},"spectrumData":[0,0,0,0,0,0,0,0,0,0,4,10,17,18,17,20,28,18,27,35,35,31,25,41,63,42,48,70,68,61,56,70,75,68,69,62,58,71,63,58,62,66,57,74,72,61,70,53,59,59,62,64,70,39,49,61,55,62,51,49,64,41,34,57,44,37,47,36,46,40,50,43,56,43,47,40,42,33,34,25,25,34,38,39,41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,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,0,1,0,0,0,0,1,0,1,2,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,3,1,2,0,1,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"detectorId":"G31","countingRates":[{"thresholds":[319.7,553.1,1019.7],"data":[234,247,256,263,278,273,261,251,235,226,242,253,259,263,266,267,264,264,272,260,254,245,246,238,245,243,259,250,243]},{"thresholds":[717.4,1083.4,1815.4],"data":[611,640,635,635,647,633,618,622,607,588,594,609,619,609,611,618,611,610,634,640,643,627,626,624,616,598,606,575,560]},{"thresholds":[953.4,1380.6,2234.9],"data":[823,849,837,837,852,838,829,838,825,800,804,810,826,804,814,820,814,814,849,855,857,838,828,830,815,798,816,791,769]},{"thresholds":[1077.6,1533.9,2446.6],"data":[938,969,951,932,960,949,931,933,926,893,900,908,941,918,936,937,928,932,977,973,984,964,949,938,929,903,929,900,893]},{"thresholds":[1202.7,1686.7,2654.8],"data":[1048,1080,1068,1052,1074,1060,1055,1054,1043,1017,1022,1017,1047,1028,1041,1048,1049,1064,1107,1109,1121,1094,1070,1064,1047,1012,1042,1014,1006]},{"thresholds":[1219.8,1707.5,2682.9],"data":[1066,1096,1084,1069,1087,1073,1068,1064,1050,1024,1028,1022,1056,1043,1057,1065,1067,1079,1121,1127,1141,1116,1092,1085,1065,1029,1054,1025,1014]}],"doseRates":{"thresholds":[0.2,3.9],"data":[0.076177333333332792,0.078891999999999449,0.079242666666666114,0.077244666666666115,0.079977999999999452,0.078981333333332793,0.082105999999999457,0.082685999999999454,0.083706666666666124,0.083812666666666119,0.084131999999999457,0.080464666666666115,0.080067333333332782,0.076187999999999451,0.075795999999999447,0.07659533333333278,0.07867733333333278,0.084517333333332778,0.0874586666666661,0.085913333333332773,0.0861406666666661,0.0818466666666661,0.077509333333332764,0.078407999999999436,0.077516666666666109,0.073711333333332768,0.080127333333332773,0.0801866666666661,0.082421333333332764]},"spectrumData":[0,0,0,0,0,0,0,0,0,0,11,29,32,17,26,21,44,31,33,38,30,44,59,56,50,69,75,61,62,60,66,68,94,64,97,66,66,61,70,64,77,61,76,68,90,60,64,57,67,69,74,60,64,53,42,59,55,59,65,45,43,54,42,45,56,54,64,36,43,48,37,48,61,58,48,42,32,47,46,42,36,43,38,32,38,39,32,44,37,26,38,35,24,31,26,37,33,34,35,19,26,27,25,23,22,26,31,17,23,23,22,18,23,18,13,14,8,16,27,20,26,12,22,13,20,15,21,9,5,11,15,17,22,16,12,8,12,12,11,5,16,15,13,12,15,7,11,8,6,9,12,8,11,13,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0,1,0,0,0,0,1,0,1,0,0,1,0,0,0,0,2,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,1,0,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,2,0,0,1,0,0,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,2,0,0,0,1,1,1,1,0,0,1,0,1,2,1,1,3,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"detectorId":"G32","countingRates":[{"thresholds":[302.6,528.7,980.9],"data":[223,217,223,216,224,226,220,210,208,204,192,212,226,229,232,226,218,202,208,214,221,222,226,214,207,207,209,220,231]},{"thresholds":[694.1,1053.5,1772.5],"data":[533,549,562,554,552,573,550,530,545,562,540,555,560,561,562,544,545,534,534,549,563,568,580,573,561,577,575,580,597]},{"thresholds":[930.1,1351.6,2194.6],"data":[734,761,784,770,765,785,761,741,754,768,752,771,772,787,797,776,774,764,761,767,777,777,786,772,772,795,785,791,825]},{"thresholds":[1052.5,1503,2404.2],"data":[840,877,909,890,885,905,882,852,868,884,859,872,877,894,906,902,899,890,885,885,887,891,902,888,899,920,907,908,937]},{"thresholds":[1177.2,1655.7,2612.7],"data":[947,988,1031,1018,1020,1034,1014,978,1002,1015,984,998,999,1006,1015,1014,1001,986,993,994,992,1003,1017,993,997,1034,1020,1028,1056]},{"thresholds":[1194.4,1676.6,2641.1],"data":[964,1007,1051,1038,1041,1052,1029,991,1020,1029,999,1011,1014,1015,1030,1031,1026,1010,1020,1016,1010,1016,1029,1005,1010,1051,1039,1047,1073]}],"doseRates":{"thresholds":[0.2,3.9],"data":[0.071357999999999963,0.074168666666666633,0.0794813333333333,0.079969333333333309,0.081240666666666642,0.081675999999999971,0.083769999999999969,0.0812433333333333,0.0814113333333333,0.083340666666666632,0.079638666666666635,0.0812253333333333,0.0790193333333333,0.081033999999999967,0.077598666666666635,0.0786293333333333,0.070294666666666644,0.068891999999999981,0.070361333333333317,0.072543999999999984,0.072732666666666654,0.078125333333333324,0.079999333333333325,0.075977333333333313,0.075281999999999988,0.078835333333333327,0.076140666666666662,0.077976666666666666,0.080332666666666663]},"spectrumData":[0,0,0,0,0,0,0,0,0,0,0,10,19,20,22,17,24,19,32,29,39,46,36,64,48,47,59,68,57,51,64,57,62,67,66,58,68,60,61,78,77,68,78,77,72,54,61,54,55,67,55,46,50,56,63,73,67,47,51,51,47,59,54,54,58,44,46,59,49,44,45,54,52,30,40,40,46,29,27,42,40,37,41,31,33,30,23,20,36,27,31,29,28,30,30,34,28,26,24,29,33,28,16,22,27,24,24,22,27,26,21,21,14,16,17,17,16,14,21,23,19,19,18,12,17,18,19,22,14,12,5,7,11,14,15,11,15,10,11,8,11,16,13,6,16,11,15,7,12,15,14,11,22,8,14,14,13,18,7,11,12,17,16,18,10,8,11,15,14,12,7,14,10,6,7,6,14,8,12,11,12,16,9,17,6,7,11,11,12,11,13,10,10,5,8,6,7,10,11,5,11,4,3,4,4,7,7,5,5,10,9,8,9,4,5,7,4,3,3,8,5,6,8,4,9,7,4,6,5,0,7,7,6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,1,0,0,0,0,1,2,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,1,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,2,0,1,2,0,1,1,1,1,2,0,1,0,0,1,1,1,0,0,1,0,0,1,0,0,0,0,2,0,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"detectorId":"G41","countingRates":[{"thresholds":[285.5,504.2,941.7],"data":[245,250,240,237,229,236,221,215,212,206,196,214,214,219,217,226,222,227,213,212,203,199,193,203,205,210,206,212,211]},{"thresholds":[669.8,1022.4,1727.4],"data":[612,594,584,577,552,561,559,584,578,575,567,580,560,570,563,544,550,559,537,525,545,525,512,530,542,547,552,561,570]},{"thresholds":[906.4,1322.1,2153.4],"data":[832,823,801,802,770,794,792,821,816,807,779,801,790,794,788,777,776,784,760,753,775,757,740,755,759,767,762,774,767]},{"thresholds":[1027.5,1472.3,2361.8],"data":[955,944,909,915,873,893,888,916,906,902,880,907,903,910,898,892,897,915,901,903,923,892,864,872,879,881,891,905,886]},{"thresholds":[1154.3,1627.8,2574.8],"data":[1078,1062,1028,1029,983,1008,1014,1039,1028,1024,1002,1014,1010,1014,1007,991,1010,1033,1032,1023,1060,1022,988,984,993,978,996,1012,1004]},{"thresholds":[1172,1649.4,2604.2],"data":[1093,1073,1045,1045,999,1026,1034,1058,1047,1044,1020,1031,1025,1032,1023,1006,1024,1047,1045,1036,1071,1035,1001,997,1007,996,1014,1029,1021]}],"doseRates":{"thresholds":[0.2,3.9],"data":[0.083849999999998,0.08471666666666465,0.07841666666666465,0.078588666666664642,0.074690666666664643,0.076245999999997982,0.07810933333333131,0.078763333333331312,0.0777453333333313,0.077115999999997978,0.07695599999999797,0.074640666666664635,0.076943999999997972,0.074300666666664641,0.076228666666664641,0.074449333333331313,0.079751999999997977,0.082741999999997984,0.087854666666664652,0.085588666666664648,0.092717999999998,0.087287333333331329,0.083271333333331324,0.078861333333331327,0.078876666666664666,0.070779999999998,0.074382666666664668,0.076408666666664668,0.077189333333331334]},"spectrumData":[0,0,0,0,0,0,0,0,0,0,12,11,18,14,17,26,27,28,31,33,37,35,38,51,43,49,72,53,57,43,55,60,70,51,75,65,65,71,80,71,74,51,66,54,57,68,69,69,62,61,64,49,53,51,64,76,59,46,54,51,56,50,44,45,62,44,56,55,50,48,48,40,42,48,47,33,40,44,29,37,39,37,37,35,37,41,36,30,28,26,35,35,23,35,30,34,33,27,30,17,30,25,25,19,23,21,17,19,31,22,25,22,21,15,20,21,23,25,21,12,25,20,15,20,23,24,18,15,13,15,13,22,18,22,11,15,11,10,15,16,13,12,13,8,12,16,16,23,15,10,13,10,9,14,9,16,9,16,12,12,5,7,13,11,11,10,18,13,11,7,10,11,9,9,13,11,8,8,17,13,13,7,9,10,10,9,7,12,9,11,7,7,17,15,12,7,11,11,13,7,4,16,6,7,9,8,3,2,8,8,10,10,10,7,4,9,8,4,4,6,9,8,5,6,3,15,5,7,10,7,6,7,3,7,2,6,2,9,9,6,4,5,6,5,7,6,7,6,1,4,4,4,5,6,8,5,3,7,7,3,8,3,7,7,3,7,7,4,3,5,4,3,0,5,5,11,6,5,2,1,5,6,5,4,4,5,4,7,3,5,6,4,1,5,4,6,8,5,8,8,2,5,3,8,3,6,4,7,3,8,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0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,0,1,0,2,0,0,0,2,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,2,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"detectorId":"G42","countingRates":[{"thresholds":[286.1,505.1,943.1],"data":[213,221,213,212,211,216,205,211,202,194,185,183,174,181,191,198,205,220,215,210,201,198,193,204,216,215,234,239,239]},{"thresholds":[671.9,1025.1,1731.3],"data":[562,570,556,563,560,562,535,550,526,513,493,507,514,530,549,551,564,576,572,571,574,561,552,574,585,567,577,569,573]},{"thresholds":[909.1,1325.5,2158.1],"data":[774,770,762,768,762,772,757,761,743,730,713,730,756,776,792,775,782,791,793,799,806,792,770,775,785,779,790,792,808]},{"thresholds":[1029.9,1475.3,2366],"data":[877,882,873,885,884,902,884,890,857,842,819,840,867,897,911,912,917,925,929,935,932,924,902,896,896,883,888,898,917]},{"thresholds":[1153.3,1626.6,2573.1],"data":[997,990,999,1009,1008,1029,1016,1014,982,970,943,958,982,1008,1013,1013,1019,1019,1030,1042,1044,1040,1029,1021,1027,1016,1027,1027,1042]},{"thresholds":[1169.9,1646.9,2600.7],"data":[1015,1008,1023,1035,1034,1054,1038,1032,995,982,952,965,990,1019,1024,1026,1037,1036,1049,1061,1063,1055,1044,1036,1044,1035,1048,1048,1060]}],"doseRates":{"thresholds":[0.2,3.9],"data":[0.076408000000000434,0.0728326666666671,0.0749546666666671,0.073978666666667109,0.074226000000000444,0.07756600000000044,0.080896666666667116,0.080429333333333783,0.081742000000000439,0.0826606666666671,0.082140000000000435,0.082634666666667092,0.083197333333333762,0.0822126666666671,0.079399333333333766,0.0783846666666671,0.075280000000000444,0.073293333333333779,0.075000000000000441,0.0775266666666671,0.078346000000000443,0.082271333333333779,0.084274666666667108,0.081350666666667112,0.081046000000000437,0.08019666666666711,0.080537333333333766,0.079047333333333761,0.081190666666667091]},"spectrumData":[0,0,0,0,0,0,0,0,0,0,5,18,14,19,25,14,27,19,36,29,35,46,41,49,49,42,35,39,52,62,60,64,52,60,64,60,73,64,72,66,82,51,78,77,73,56,52,70,52,54,65,53,55,62,61,63,48,51,66,45,47,57,45,55,52,53,54,48,54,41,56,27,51,41,44,29,41,48,46,40,42,32,40,32,36,34,32,35,22,31,27,33,24,25,38,24,27,35,29,25,29,25,24,21,16,31,19,32,28,19,18,23,15,20,30,21,21,20,24,19,17,16,8,19,23,30,18,17,15,19,9,15,24,9,17,8,22,16,13,18,13,12,15,11,9,10,14,9,12,13,8,14,17,9,4,11,13,14,12,11,6,14,8,10,15,9,14,9,8,8,15,10,7,19,13,12,15,7,8,8,10,11,10,16,10,7,14,10,16,9,14,9,9,10,10,14,7,12,12,13,6,2,12,6,6,8,7,5,5,6,5,6,11,6,6,9,5,7,7,3,6,7,10,4,8,6,3,2,8,4,6,6,6,14,12,6,3,9,9,9,4,10,8,6,6,8,4,6,4,6,2,6,5,5,9,6,5,7,6,8,7,2,1,3,5,2,4,7,10,4,6,10,7,4,4,4,6,3,7,3,5,2,2,10,6,4,5,1,4,7,5,5,5,8,1,4,7,4,4,3,1,5,7,4,5,3,2,2,5,3,6,4,3,6,2,5,1,6,5,5,8,7,3,6,7,3,2,5,4,1,7,4,1,5,1,3,6,5,3,1,2,3,3,2,1,9,5,2,2,2,7,4,4,3,5,6,1,5,3,6,2,4,2,3,1,4,3,5,3,2,2,4,1,2,5,3,7,5,3,4,4,4,3,1,4,2,3,3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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}],"neutronCountingRate":{"thresholds":[14,15,16],"data":[2,4,6,5,5,4,2,0,2,3,3,3,4,2,1,1,1,2,4,4,4,4,2,0,1,1,3,3,3]},"neutronDetectorRecords":[{"detectorId":"N11","countingRates":[],"doseRates":{"thresholds":[],"data":[]},"spectrumData":[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]},{"detectorId":"N12","countingRates":[],"doseRates":{"thresholds":[],"data":[]},"spectrumData":[0,0,0,0,1,2,0,1,0,0,0,0,1,0,0,0]},{"detectorId":"N21","countingRates":[],"doseRates":{"thresholds":[],"data":[]},"spectrumData":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"detectorId":"N22","countingRates":[],"doseRates":{"thresholds":[],"data":[]},"spectrumData":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},{"detectorId":"N31","countingRates":[],"doseRates":{"thresholds":[],"data":[]},"spectrumData":[0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0]},{"detectorId":"N32","countingRates":[],"doseRates":{"thresholds":[],"data":[]},"spectrumData":[0,0,0,0,1,0,1,1,0,0,1,1,0,1,0,0]},{"detectorId":"N41","countingRates":[],"doseRates":{"thresholds":[],"data":[]},"spectrumData":[0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0]},{"detectorId":"N42","countingRates":[],"doseRates":{"thresholds":[],"data":[]},"spectrumData":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}],"nuclideInfos":[{"category":"核素类型1","name":"金","probability":19},{"category":"核素类型2","name":"银","probability":23},{"category":"核素类型3","name":"铜","probability":3},{"category":"核素类型4","name":"欠","probability":45}]}},{"deviceId":"TFNAU-II-080051","recordId":"a0a1f580-30e1-49e0-b9a8-ebe5dd7af2ff","createAt":"2020-01-08T14:44:45","nuclideInfos":[],"gammaCountingRate":{"data":[5014,4980,5046,5021,4941,4913,4959,4878,4871,4887,4948,4948,4969,4986,4981,4938,4954,4952,4942,4963,4954,4948,4957,4954,4918,4938,4948,4995,5039,5087,5036,4996,4975,4967,4982],"thresholds":[5268,5479,5619]},"gammaMasterDownCountingRate":{"data":[1584,1597,1648,1604,1573,1559,1542,1489,1521,1501,1507,1510,1518,1507,1512,1527,1533,1522,1536,1540,1530,1530,1550,1567,1571,1575,1576,1578,1578,1583,1571,1572,1568,1541,1537],"thresholds":[1705,1821,1899]},"gammaMasterUpCountingRate":{"data":[1520,1484,1492,1513,1493,1509,1545,1533,1516,1545,1567,1583,1590,1621,1598,1577,1575,1566,1549,1544,1535,1525,1530,1517,1517,1524,1535,1545,1582,1602,1560,1574,1569,1570,1578],"thresholds":[1760,1879,1958]},"gammaSlaveDownCountingRate":{"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"thresholds":[0,0,0]},"gammaSlaveUpCountingRate":{"data":[1910,1899,1906,1904,1875,1845,1872,1856,1834,1841,1874,1855,1861,1858,1871,1834,1846,1864,1857,1879,1889,1893,1877,1870,1830,1839,1837,1872,1879,1902,1905,1850,1838,1856,1867],"thresholds":[2058,2187,2273]},"neutronCountingRate":{"data":[2,2,2,2,1,1,0,0,1,1,1,1,2,1,1,1,1,0,0,0,2,2,2,2,2,0,1,2,2,2,2,1,0,0,0],"thresholds":[1,1,1]},"neutronMasterDownCountingRate":{"data":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"thresholds":[1,1,1]},"neutronMasterUpCountingRate":{"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"thresholds":[1,1,1]},"neutronSlaveDownCountingRate":{"data":[1,2,2,2,1,1,0,0,1,1,1,1,2,1,1,1,1,0,0,0,2,2,2,2,2,0,1,2,2,2,2,1,0,0,0],"thresholds":[1,1,1]},"neutronSlaveUpCountingRate":{"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"thresholds":[1,1,1]},"alarmInfos":[]},{"rmType":"RM1000","deviceId":"TFNAU-I-190001","recordId":"b7d32ab3-4d22-4962-9b76-9a1938962614","startTime":"2019-11-20 17:24:05","endTime":"2019-11-20 17:24:23","gammaAlarmLevel":"Low","neutronAlarmLevel":"None","nuclides":["Suspicion","Suspicion"],"alarmInfos":["GammaLow"],"gammaRecord":{"cps":[6190,6210,6224,6234,6262,6274,6258,6240,6236,6252,6242,6258,6234,6250,6264,6280,6276,6288,6272,6276,6272,6286,6300,6336,6274,6270,6214,6226,6222,6250,6254,6290,6266,6260,6268,6280,6254,6266,6272,6270,6238,6266,6278,6252,6244,6278,6270,6266,6300,6334,6310,6306,6270,6274,6286,6298,6330,6346,6330,6264,6252,6208,6220],"thresholdHigh":0,"thresholdMedium":0,"thresholdLow":0},"gammaMasterDownRecord":{"cps":[4116,4148,4156,4156,4176,4196,4180,4180,4164,4188,4164,4188,4156,4180,4188,4212,4196,4204,4188,4188,4172,4180,4188,4212,4160,4160,4120,4140,4140,4168,4168,4208,4168,4168,4160,4180,4140,4160,4152,4172,4128,4164,4180,4164,4160,4200,4180,4164,4204,4212,4196,4196,4180,4180,4200,4200,4240,4248,4232,4184,4176,4120,4136],"thresholdHigh":0,"thresholdMedium":0,"thresholdLow":0},"gammaMasterUpRecord":{"cps":[2074,2062,2068,2078,2086,2078,2078,2060,2072,2064,2078,2070,2078,2070,2076,2068,2080,2084,2084,2088,2100,2106,2112,2124,2114,2110,2094,2086,2082,2082,2086,2082,2098,2092,2108,2100,2114,2106,2120,2098,2110,2102,2098,2088,2084,2078,2090,2102,2096,2122,2114,2110,2090,2094,2086,2098,2090,2098,2098,2080,2076,2088,2084],"thresholdHigh":0,"thresholdMedium":0,"thresholdLow":0},"gammaSlaveDownRecord":{"cps":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"thresholdHigh":0,"thresholdMedium":0,"thresholdLow":0},"gammaSlaveUpRecord":{"cps":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"thresholdHigh":0,"thresholdMedium":0,"thresholdLow":0},"neutronRecord":{"cps":[10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,12,14,16,18,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20],"thresholdHigh":0,"thresholdMedium":0,"thresholdLow":0},"neutronMasterDownRecord":{"cps":[10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,12,14,16,18,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20],"thresholdHigh":0,"thresholdMedium":0,"thresholdLow":0},"neutronMasterUpRecord":{"cps":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"thresholdHigh":0,"thresholdMedium":0,"thresholdLow":0},"neutronSlaveDownRecord":{"cps":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"thresholdHigh":0,"thresholdMedium":0,"thresholdLow":0},"neutronSlaveUpRecord":{"cps":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"thresholdHigh":0,"thresholdMedium":0,"thresholdLow":0}}]


def post(url, data):
    if not url.strip():
        return
    try:
        print(url, data)
        r = requests.post(url, json=data)
        if r.ok:
            return r.content.decode('utf-8')
        return r.status_code
    except Exception as ex:
        print(ex)
    pass


def PostNew():
    url = f"{host}/api/inspection/new"
    while True:
        time.sleep(5)
        if regist == 0:
            continue
        device = random.choice(devices)
        index =random.randint(0,2)
        car = random.choice(cars)
        data = {
            "deviceType": device.get("deviceType"),
            "deviceId": device.get("deviceId"),
            "deviceIp": device.get("deviceIp"),
            "deviceNo": index+3,# device.get("devNo", 2),
            "data": datarm[index],
            #     {
            #     "bagcount": random.randint(1, 500),
            #     "inspectionTime": time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),
            #     "createAt": int(time.time()*1000),
            #     "ccrNos": car.get("ccrNos", "京A19029"),
            #     "lprNo": car.get("lprNo", "jzx001"),
            # },
            "time": time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        }
        res = post(url, data)
        print(res)
    pass


def PostAlarm():
    url = f"{host}/api/inspection/alarm"
    while True:
        time.sleep(10)
        if regist == 0:
            continue
        device = random.choice(devices)
        car = random.choice(cars)
        data = {
            "deviceType": device.get("deviceType"),
            "deviceId": device.get("deviceId"),
            "deviceIp": device.get("deviceIp"),
            "deviceNo": device.get("devNo", default=2),
            "data": {"pic": random.randint(500, 1000),
                     "inspectionTime": time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),
                     "createAt": int(time.time()*1000),
                     "ccrNos": car.get("ccrNos", default="京A19029"),
                     "lprNo": car.get("lprNo", default="jzx001"),
                     },
            "time": time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        }
        res = post(url, data)
        print(res)
    pass


def PostStatus():
    url = f"{host}/api/inspection/changeevent"
    while True:
        time.sleep(10)
        if regist == 0:
            continue
        device = random.choice(devices)
        data = {
            "deviceType": device.get("deviceType"),
            "deviceId": device.get("deviceId"),
            "deviceState": device.get("deviceId"),
            "deviceNo": device.get("devNo", default=2),
            "time": time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        }
        res = post(url, data)
        print(res)
    pass


# class BaseHandler(tornado.web.RequestHandler):
#     def send(self, obj):
#         self.write(obj)
#
#
# class RegistHandler(BaseHandler):
#     def post(self):
#         params = self.request.body
#         params = json.loads(params)
#         global regist
#         regist = 1
#         self.send({"message": "接收成功", "success": True})
#         print(params)


# def getPoints():
#     handlers = [
#         (r'/api/RegisterCallback/Post', RegistHandler),
#     ]
#     return handlers


def main():
    threading.Thread(target=PostNew).start()
    # threading.Thread(target=PostAlarm).start()
    # threading.Thread(target=PostStatus).start()

    # options.parse_command_line()
    # points = getPoints()
    # app = tornado.web.Application(handlers=points)
    # http_server = tornado.httpserver.HTTPServer(app)
    # http_server.listen(options.port)
    # tornado.ioloop.IOLoop.instance().start()
    pass


if __name__ == '__main__':
    main()
